﻿
using System.Threading.Tasks;

public interface IConnection
{
    void Connect(string host, int port);

    //int Send(byte[] data, int index, int length);

    //int Recv(byte[] data, int index, int length);

    int RecvInBuffer();

    int RecvData(byte[] data, int index, int length);

    int GetRecvLen();

    int Send(byte[] data, int index, int length);

    bool IsConnected { get; }

    //string GetAdrr();

    void Close();
}
